<?php
namespace Mobile\Controller;
use Think\Controller;
class ListController extends Controller {
    public function index(){
		//栏目ID
		$cateid = I('get.cateid');
		if (empty($cateid)) {
			$this->error("请指定栏目！");
		}
		$search="/".MODULE_NAME."/search/index";
		$template = M('category')->where("cateid=$cateid")->getfield('list_template');
		$com=M("configs")->where("name='CFG_WEBNAME'")->getField("value");
		$title = M('category')->where("cateid=$cateid")->getfield('seo_title');
		$template = str_replace('.html', '', $template);
		$this->assign("com",$com);
		$this->assign("search",$search);
		$this->assign("title",$title);
		$this->display('/'.$template);
    }
    public function lists(){
		//栏目ID
		$cateid = I('get.cateid');
		if (empty($cateid)) {
			$this->error("请指定栏目！");
		}
		$search="/".MODULE_NAME."/search/index";
		$com=M("configs")->where("name='CFG_WEBNAME'")->getField("value");
		$title = M('category')->where("cateid=$cateid")->getfield('seo_title');
		$template = M('category')->where("cateid=$cateid")->getfield('list_template');
		$template = str_replace('.html', '', $template);
		$this->assign("com",$com);
		$this->assign("search",$search);
		$this->assign("title",$title);
		$this->display('/'.$template);
    }

}